home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3p / pthread_create.z / pthread_create
Encoding:
Text File  |  1998-10-20  |  3.5 KB  |  67 lines

  1.  
  2.  
  3.  
  4. pppptttthhhhrrrreeeeaaaadddd____ccccrrrreeeeaaaatttteeee((((3333PPPP))))                                          pppptttthhhhrrrreeeeaaaadddd____ccccrrrreeeeaaaatttteeee((((3333PPPP))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      pthread_create - create and start a thread
  10.  
  11. CCCC SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<pppptttthhhhrrrreeeeaaaadddd....hhhh>>>>
  13.  
  14.      iiiinnnntttt pppptttthhhhrrrreeeeaaaadddd____ccccrrrreeeeaaaatttteeee((((pppptttthhhhrrrreeeeaaaadddd____tttt ****tttthhhhrrrreeeeaaaadddd,,,, pppptttthhhhrrrreeeeaaaadddd____aaaattttttttrrrr____tttt ****aaaattttttttrrrr,,,,
  15.           vvvvooooiiiidddd ****((((****ssssttttaaaarrrrtttt))))((((vvvvooooiiiidddd ****)))),,,, vvvvooooiiiidddd ****aaaarrrrgggg))));;;;
  16.  
  17. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      The _p_t_h_r_e_a_d__c_r_e_a_t_e() function creates a thread with the attributes
  19.      specified by _a_t_t_r, starting execution at the function named _s_t_a_r_t with
  20.      the argument value _a_r_g.  A null value of _a_t_t_r causes the thread to be
  21.      created with default attributes.  The thread identity is saved in the
  22.      location pointed to by the _t_h_r_e_a_d argument.
  23.  
  24.      A new thread inherits its per-thread signal mask from its creator.  No
  25.      signals are pending on the thread when it starts.  The thread runs until
  26.      it returns from its _s_t_a_r_t function, calls _p_t_h_r_e_a_d__e_x_i_t(), or acts on a
  27.      cancellation request.  The exception is the initial thread which will
  28.      cause the process to exit if it returns from _m_a_i_n().  When the process
  29.      terminates so do all its threads.
  30.  
  31.      For an overview of POSIX threads see _p_t_h_r_e_a_d_s(5).
  32.  
  33. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  34.      On success, _p_t_h_r_e_a_d__c_r_e_a_t_e() returns zero; otherwise an error number is
  35.      returned:
  36.  
  37.      [[[[EEEEAAAAGGGGAAAAIIIINNNN]]]]       The maximum number of threads has been created [see NNNNOOOOTTTTEEEESSSS,
  38.                     and _s_e_t_r_l_i_m_i_t()] or there is insufficient memory to create
  39.                     the thread.
  40.  
  41.      [[[[EEEEPPPPEEEERRRRMMMM]]]]        The calling process lacks sufficient privilege to create a
  42.                     thread with these attributes [see
  43.                     _p_t_h_r_e_a_d__a_t_t_r__s_e_t_s_c_o_p_e()].
  44.  
  45. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  46.      pthread_attr_init(3P), pthread_attr_setscope(3P), pthread_exit(3P),
  47.      pthreads(5), setrlimit(2), sysconf(3C).
  48.  
  49. NNNNOOOOTTTTEEEESSSS
  50.      A thread application can find the thread limit using the _s_y_s_c_o_n_f()
  51.      function with the ____SSSSCCCC____TTTTHHHHRRRREEEEAAAADDDD____TTTTHHHHRRRREEEEAAAADDDDSSSS____MMMMAAAAXXXX option.
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.